package com.example.demo_spring.ioc_di.spring.depInterface;

public class MyCustomer3 implements ICustomer{
    private String mName;
    private boolean isSetName;

    public MyCustomer3(){
        isSetName = false;
        System.out.println("Constructor: [spring_depInterface] MyCustomer3");
    }

    public MyCustomer3(String name){
        isSetName = true;
        mName = name;
        System.out.println("" +
                "Constructor: [spring_depInterface] MyCustomer3 with name ");
    }

    public void setName(String name) {
        if (!isSetName){
            mName = name;
        }
    }

    public void displayInfo() {
        System.out.println("Hello[MyCustomer3]: "+ mName);
    }
}
